using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for bzAbout
/// </summary>
public class bzAbout
{
    private dbConnection _DB = null;
    private string _TableName = "bzAbout";
    private string _IDType = "_NVARCHAR";
    private string _IDCol = "Name";
    private string _TableChild = "";


    //-------Define value of Data
    #region defineData 
    public struct Enable
    {
        private static int _Enabled = 1;
        public static int Enabled { get { return _Enabled; } }

        private static int _Disabled = 1;
        public static int Disabled { get { return _Disabled; } }
    }
    public struct AboutKey
    {
        private static string _ContactAbout = "ContactAbout";
        public static string ContactAbout { get { return _ContactAbout; } }

        private static string _About = "About";
        public static string About { get { return _About; } }

        private static string _Daotao = "Daotao";
        public static string Daotao { get { return _Daotao; } }

        private static string _Service = "Service";
        public static string Service { get { return _Service; } }

        private static string _Training = "Training";
        public static string Training { get { return _Training; } }
        

        
    }
    #endregion definData




    //-----------Method
    #region FunctionDB
    public bzAbout()
	{
        _DB = new dbConnection();
	} 
    public DataTable getRecord(string ID, int Enabled)
    {
        SqlParameter[] p = new SqlParameter[4];
        p[0] = new SqlParameter("@TableName", _TableName);
        p[1] = new SqlParameter("@IDCol", _IDCol);
        p[2] = new SqlParameter("@IDValue", ID);
        p[3] = new SqlParameter("@Enabled", Enabled);
        return _DB.getDataTable("bz_getRecord" + _IDType, p);
    }
    
    public int updateRecord(string sName,string sDesVN, string sDesEN,string sContentVN,string sContentEN)
    {
        SqlParameter[] p = new SqlParameter[5];
        p[0] = new SqlParameter("@Name", sName);
        p[1] = new SqlParameter("@DesVN", sDesVN);
        p[2] = new SqlParameter("@DesEN", sDesEN);
        p[3] = new SqlParameter("@ContentVN", sContentVN);
        p[4] = new SqlParameter("@ContentEN", sContentEN);

        return _DB.updateData(_TableName + "_update", p);
    }
    #endregion FunctionDB
}
